#  author:张靖昆 date:2020/3/3 name:5_break IDE:PyCharm
# for i in range(10):
#     if i>5:
#         # 循环被中断
#         break
#     print(i)

# 举例什么时候中断

s='hello world'
# 判断字符串s中是否有o
'''
# 方案一
flag=False
for c in s:
    if c=='o':
        flag=True
        break
if flag==True:
    print("yes")
else:
    print("no")

'''
# 方案er
for c in s :
    if c=='o':
        print('yes')
        break

else:
    print('no')



